<p class="pageTitle"><%= l(:common, :editing) + " - " + link_to(@artist.fullname, admin_artist_url(@artist)) + ' - ' + l(:common, :publishing) %></p>

<%= error_messages_for :admin_artist %>

<% check_requirements :artist %>

<% tabnav :artist do %>
  <div><strong>Requirements to Publish:</strong></div>
  <br />

  Must have at least one Description:
  <% if @requirements[:description] > 0 %>
    <span class="requirements_met">Yes, you have <%= @requirements[:description] %> </span>
  <% else %>
    <span class="requirements_not_met">No, you must add at least one</span>
  <% end %>

  <br />
  Must have at least one Picture (Media) item:
  <% if @requirements[:media] > 0 %>
    <span class="requirements_met">Yes, you have <%= @requirements[:media] %> </span>
  <% else %>
    <span class="requirements_not_met">No, you must add at least one</span>
  <% end %>

  <br /><br />
  <div>
  Current state: 
  <% if @artist.published %>
    <span class="requirements_met">PUBLISHED</span>
  <% else %>
    <span class="requirements_not_met">NOT PUBLISHED</span>
  <% end %>
  <br /><br />

  <% unless @artist.published %>
    <%= button_to "Publish", {:action => :change_published, :act => :publish, :artist => @artist}, {:disabled => !meets_requirements?} %>
  <% else %>
    <%= button_to "Unpublish", {:action => :change_published, :act => :unpublish, :artist => @artist} %>
  <% end %>
  </div>
<% end %>